package com.sali.b_design_pattern.e_template_pattern.lesson_entity_wrapper.optimize;

import com.sali.b_design_pattern.e_template_pattern.lesson_entity_wrapper.pojo.User01;
import com.sali.b_design_pattern.e_template_pattern.lesson_entity_wrapper.pojo.User02;
import com.sali.b_design_pattern.e_template_pattern.lesson_entity_wrapper.pojo.User03;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;

@SpringBootTest()
class OptimizeStarter {
    @Resource
    UserTemplate<User01> user01Template;

    @Resource
    UserTemplate<User02> user02Template;

    @Resource
    UserTemplate<User03> user03Template;


    @Test
    void contextLoads() {

        User01 user01 = user01Template.process(System.currentTimeMillis(), System.currentTimeMillis());
        System.out.println(user01.toString());

        User02 user02 = user02Template.process(System.currentTimeMillis(), System.currentTimeMillis());
        System.out.println(user02.toString());

        User03 user03 = user03Template.process(System.currentTimeMillis(), System.currentTimeMillis());
        System.out.println(user03.toString());
    }

}
